package com.crm.system.controller.csd.customerManager;

import com.crm.common.model.DataResponse;
import com.crm.common.model.DhPageInfo;
import com.crm.common.model.DhResponse;
import com.crm.common.model.Enum.ResponseCodeEnum;
import com.crm.model.vo.csd.customerManager.CustomerContactPersonVO;
import com.crm.model.vo.csd.customerManager.CustomerServiceWorkLogVO;
import com.crm.system.service.csd.customerManager.ContractContactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 客户管理-客户列表-客户详情-合同联系人
 * @author luojie
 * @date 2021/9/3 8:59
 */
@RestController
@RequestMapping("/csd/contractContact")
public class ContractContactController {

    @Autowired
    private ContractContactService contractContactService;

    /***
     * @Description:根据合同id获取合同审核列表
     * @Param: contractId 合同id
     * @Author: luojie
     * @Date: 2021/9/3 10:02
     */
    @PostMapping("/selectContractContactWorkLogByContractId")
    public DataResponse selectContractContactLogByContractId(@RequestParam(value = "pageIndex", required = true) Integer pageIndex,//页码
                                                             @RequestParam(value = "pageSize", required = true) Integer pageSize,//分页大小
                                                             @RequestParam(value="sortName",required = false) String sortName,//排序列名字
                                                             @RequestParam(value="sortOrder",required = false) String sortOrder,//排序规则(asc/desc)
                                                             @RequestParam String contractId){
        DhPageInfo<CustomerServiceWorkLogVO> customerServiceWorkLogVOList = contractContactService.selectContractContactWorkLogByContractId(pageIndex,pageSize,sortName,sortOrder,contractId);
        return new DhResponse(ResponseCodeEnum.OK.getResponseCode(),customerServiceWorkLogVOList);
    }
}
